home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / eval.zip / EVAL.TXT < prev    next >
Text File  |  1993-01-29  |  5KB  |  143 lines

  1.                                    EVAL
  2.                        (c) 1993 by Alexander Walter
  3.  
  4.  
  5.  
  6. WHAT IS IT?
  7. ===========
  8.  
  9.     EVAL is a mathematical expression evaluator for QuickBasic. The
  10.     expression must be in correct QuickBasic syntax, and can include
  11.     functions such as SQR(), ATN(), COS(), etc. Correct hierarchy of
  12.     mathematical evaluation is observed. Format of the result is decimal
  13.     by default, but can be made hexadecimal or octal.
  14.  
  15.  
  16. REGISTRATION INFORMATION
  17. ========================
  18.  
  19.     EVAL is offered as shareware. For a very modest $15 registration fee,
  20.     you will receive the QuickBasic source code for EVAL. By registering,
  21.     you can incorporate this sort of function into your Basic programs.
  22.     Register by sending check or money order to:
  23.  
  24.          Alexander Walter
  25.          182 ILER Dr.
  26.          Middletown, NJ.  07748
  27.  
  28.          (800) 262-0827   USA only
  29.          (908) 949-0507  or  (908) 671-5080   otherwise
  30.  
  31.  
  32. USING EVAL
  33. ==========
  34.  
  35.     EVAL reads the command-line, and evaluates it as a valid QuickBasic
  36.     mathematics expression. The syntax for using EVAL is:
  37.  
  38.                             eval <expression$>
  39.  
  40.     where <expression$> is a mathematical formula in QuickBasic syntax.
  41.     For instance, the following are recognized and evaluated:
  42.  
  43.          eval 5 * sqr(30)
  44.          eval 10 * log10(0.05)
  45.          eval cos(pi/8)
  46.          eval sqr(5.6e+3)
  47.          eval hex$(32 + &h100)
  48.          eval oct$(64 + &o777)
  49.          eval 19.93 * (1.05^(-1/3) - 1)
  50.          eval sinh(sinh(sinh(.01)))
  51.  
  52.     EVAL honors the algebraic operator hierarchy. At equal levels of
  53.     parentheses nesting, algebraic operators are evaluated in the
  54.     following order:
  55.  
  56.          ^    exponentiation
  57.          -    negation
  58.          *,/  multiplication and division
  59.          \    integer division
  60.          MOD  modulo arithmetic
  61.          +,-  addition and subtraction
  62.          Logical operations:  NOT, AND, OR, XOR, EQV, IMP
  63.  
  64.     Relational operations ( =, >, <, <>, <=, >= ) are not presently
  65.     supported.
  66.  
  67.  
  68.     Eval recognizes the following intrinsic QuickBasic functions:
  69.  
  70.          SIN()          COS()       ATN()       SQR()       ABS()
  71.          INT()          LOG()       SGN()       TAN()       CINT()
  72.          EXP()          MOD         AND         OR          XOR
  73.          IMP            EQV
  74.  
  75.     The following mathematical functions are also evaluated by EVAL, even
  76.     though they are not intrinsic QuickBasic functions. In the source
  77.     code, registered users can easily see how to add more functions.
  78.  
  79.          SINH():        Hyperbolic sine
  80.          COSH():        Hyperbolic cosine
  81.          ARCSIN():      Arc sine
  82.          ARCCOS():      Arc cosine
  83.          LOG10():       Base 10 logarithm
  84.  
  85.     All sinusoidal functions are evaluated in radians.
  86.  
  87.     The following symbolic constants are also understood by EVAL. In the
  88.     source code, registered users can easily see how to add recognition of
  89.     other symbolic constants.
  90.  
  91.          PI = 3.141592653589793#
  92.  
  93.     Numeric constants are interpreted as decimal by default, but they can
  94.     be interpreted as hexadecimal by prefixing the constant with "&h".
  95.     Constants can be interpreted as octal by prefixing them with "&o". For
  96.     instance, 65 = &h41 = &o101. The different representations can be
  97.     mixed in the same expression.
  98.  
  99.     The format of the output is decimal by default, but can be made
  100.     hexadecimal by enclosing the expression with "hex$()". The format can
  101.     be made octal by enclosing the expression with "oct$()". For instance:
  102.  
  103.          COMMAND                    RESULT
  104.          ---------                  ---------
  105.          eval 65+65                 130
  106.          eval hex$(65 + &o101)       82 (hex)
  107.          eval oct$(&h41 + &o101)    202 (octal)
  108.  
  109.     With hexadecimal or octal output formatting, any fractional part of
  110.     the result is truncated.
  111.  
  112.  
  113. MISCELLANEOUS NOTES
  114. ===================
  115.  
  116.     If you are using the 4DOS replacement for Microsoft's COMMAND.COM,
  117.     4DOS appears to interpret the exponentiation symbol "^", and prevents
  118.     it from being passed to EVAL. For this reason, the tilde character "~"
  119.     is also recognized as an exponentiation symbol.
  120.  
  121.     EVAL does not process statements that have adjacent exponentiation and
  122.     negation, such as "4^-2". Instead, use parentheses such as "4^(-2)".
  123.  
  124.  
  125. OTHER SHAREWARE PRODUCTS AVAILABLE:
  126. ==================================
  127.  
  128.     FONTEDIT:
  129.     --------
  130.     View & edit any HP LaserJet bit-mapped soft font. Requires
  131.     VGA/EGA/CGA/Herc or AT&T video. Mouse optional. Handles portrait or
  132.     landscape, fixed or proportional, and can convert between them.
  133.     Handles up to 110 pt (VGA), 80 pt (EGA), 88 pt (Herc & AT&T), or 44 pt
  134.     (CGA). Sculpt individual pixels, or use the many built-in special
  135.     effects and area shapes. Can import characters from black & white
  136.     .PCX, .TIF, or from other soft fonts. Many features.
  137.  
  138.     TT2BMAP:
  139.     -------
  140.     This program can convert a TrueType font into bitmapped, so that older
  141.     DOS programs that don't understand TrueType can still use the latest
  142.     fonts.
  143.